package com.sevenGroup.pawnshop.exception;

import com.sevenGroup.pawnshop.Utils.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExpection {
    @ExceptionHandler(sevenGroupException.class)
    public Result handlerwoniuxyExpection(sevenGroupException a) {
        return Result.fail(null).setState(a.getCode()).setMessage(a.getMessage());
    }
}
